<?php
include_once('global.php');
if($action->_islogin())					//检测是否判断
{
	header('Location:login.php');
	exit();
}
switch($_GET['t'])
{
	case 'reader':
		$tj_pager = 'reader';
		$title = '读者统计';
		//读取所有等级级用户数量
		$res = $member->tongji_reader();
		$total = array_sum($res);
		break;
	case 'book':
		$tj_pager  = 'book';
		$title     = '图书统计';
		$total     = $book->_read_count_books();	//统计图书总数
		$tj_class  = $book->_read_class();		//按分类
		$tj_pstore = $book->_class_by_pstore();	//按出版社
		$tj_pdate  = $book->_class_by_date();	//按出版日期
		$dis = isset($_GET['dis']) ? $_GET['dis'] : 'tj1';
		break;
}
include('templates/tongji.html');
?>